package org.budo.oceanengine.api.entity;

import lombok.Data;

import java.io.Serializable;

/**
 *
 *  响应公共信息
 *
 * @description:
 *
 * @author           zhangqian
 *
 * @createDate:     2021/4/15 11:05
 *
 * @updateUser:     zhangqian
 *
 * @updateDate:     2021/4/15 11:05
 *
 * @updateRemark:
 *
 * @version:        1.0
 *
 */
@Data
public class BaseResponse implements Serializable {

    private static final long serialVersionUID = -2396166842743464893L;

    /**
     * 返回码
     */
    private Integer code;

    /**
     * 返回信息
     */
    private String message;

    /**
     * 请求日志id
     */
    private String requestId;

    /**
     * json返回值
     */
    private String data;

    public boolean isSuccess(){

        if(code == null || code != 0){
            return false;
        }

        return true;
    }
}
